package com.augurit.common.entity;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import org.apache.commons.lang.builder.ToStringBuilder;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

/**
 * 系统首页配置Entity类
 *
 */
@Entity
@Table(name = "AT_HOMEPAGE_CONFIG")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class AtHomepageConfig {

	//属性
	private Long hcId;				//主键ID
	private String homepageCode;	//首页编号
	private String homepageName;	//首页名称
	private Integer loadMenuLevel;	//预加载菜单树层次
	private String loadByTree;		//是否以树方式加载。0为否，1为是
	private String modelName;		//对应首页的JAVA模型名称
	private String isActive;		//是否启用，0表示禁用，1表示启用
	private String remark;			//备注
	
	@Id
    @SequenceGenerator(name="SEQ_AT_HOMEPAGE_CONFIG", sequenceName="SEQ_AT_HOMEPAGE_CONFIG", allocationSize=1)
    @GeneratedValue(strategy=GenerationType.SEQUENCE, generator="SEQ_AT_HOMEPAGE_CONFIG")
	public Long getHcId() {
		return hcId;
	}

	public void setHcId(Long hcId) {
		this.hcId = hcId;
	}

	public String getHomepageCode() {
		return homepageCode;
	}

	public void setHomepageCode(String homepageCode) {
		this.homepageCode = homepageCode;
	}

	public String getHomepageName() {
		return homepageName;
	}

	public void setHomepageName(String homepageName) {
		this.homepageName = homepageName;
	}

	public Integer getLoadMenuLevel() {
		return loadMenuLevel;
	}

	public void setLoadMenuLevel(Integer loadMenuLevel) {
		this.loadMenuLevel = loadMenuLevel;
	}

	public String getIsActive() {
		return isActive;
	}

	public void setIsActive(String isActive) {
		this.isActive = isActive;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}
	
	public String getLoadByTree() {
		return loadByTree;
	}

	public void setLoadByTree(String loadByTree) {
		this.loadByTree = loadByTree;
	}

	public String getModelName() {
		return modelName;
	}

	public void setModelName(String modelName) {
		this.modelName = modelName;
	}

	@Override
	public String toString() {
		return ToStringBuilder.reflectionToString(this);
	}
}